package org.xiaov.lunasql.spring.mybatis;

import lombok.Setter;
import org.dromara.hutool.core.text.StrUtil;

/**
 * <p>
 * DatabaseTypeHolder
 * </p>
 *
 * @author lzq
 * @since 2024/12/26 20:46
 */
public class DatabaseTypeHolder {

    @Setter
    private static String dbType;

    /**
     * 获取数据库类型
     *
     * @return String
     */
    public static String getDbType() {
        if (StrUtil.isBlank(dbType)) {
            throw new IllegalStateException("dbType为空！");
        }
        return dbType;
    }
}
